<%= link_to(user_path(user), "data-toggle" => "tooltip", "title" => user.name) do %>
    <% @att = Attachment.user_avatar(user.id).last %>
    <% if @att %>
        <%= image_tag(@att.avatar.mini.url, class: "head-icon") %>
    <% else %>
        <%= image_tag(default_icon_path(user.default_icon_str), class: "head-icon") %>
    <% end %>
<% end %>